package com.nnxy.mapper;

import com.github.pagehelper.Page;
import com.nnxy.pojo.Clazz;
import com.nnxy.pojo.Emp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

//班级管理
@Mapper
public interface ClazzMapper {
     Page<Clazz> findByPage(String name,LocalDate begin, LocalDate end);
       void insert(Clazz clazz);
     //查询所有的员工信息
    @Select("select * from emp where job=1")
    List<Emp> findAll();

    Clazz findById(Integer id);

    void update(Clazz clazz);

    void removeById(@Param("clazzId") Integer id);


    //int deleteByClazzId(Integer clazzId);
    int hasEmployees(@Param("clazzId") Integer clazzId);

    List<Clazz> queryAllClazz();
}
